public class Compressor
{
   public String compressImage(String imageColors)
   {
      // your work here   
      imageColors+="2";
      
      String s1="";
      
      int n=imageColors.length();
      
      int t=1;
      for(int i=0;i<n-1;i++) {
         
         if(imageColors.charAt(i)!=imageColors.charAt(i+1)) {
            s1+=t;
            s1+=imageColors.charAt(i);
            
            t=1;
            continue;
         }
         
         t++;
      
      }
      
      return s1;
      
   } 
}